package com.egdigital.allzic.ui.activity;

import android.media.AudioManager;
import android.os.Bundle;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.MenuItem;
import com.egdigital.allzic.R;

public class ActivityLegalInformation extends SherlockActivity {

	private static final String	TAG	= ActivityLegalInformation.class.getSimpleName();	// log
	private ActionBar			mActionbar;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		this.setVolumeControlStream(AudioManager.STREAM_MUSIC); // allow music volume
		setContentView(R.layout.activity_legal_information); // layout
		//
		mActionbar = getSupportActionBar();
		mActionbar.setTitle(getString(R.string.activity_licence_title));
		mActionbar.setHomeButtonEnabled(true);
		mActionbar.setDisplayHomeAsUpEnabled(true);
		super.onCreate(savedInstanceState);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
			case android.R.id.home:
				finish();
				overridePendingTransition(R.anim.slide_from_behind, R.anim.slide_out_right);
				break;
		}
		return super.onOptionsItemSelected(item);
	}

	@Override
	public void onBackPressed() {
		super.onBackPressed();
		finish();
		overridePendingTransition(R.anim.slide_from_behind, R.anim.slide_out_right);
	}
}
